Probo Reseller API icon

Probo Reseller API

(0 reviews)

Order Flows

By combining the different API resources, order flows are created. Each flow consists of different phases. Each phase is documented as a sequence diagram with contextual description. A phase may include one or more calls to different API resources.

Resource details are explained in the Endpoints section. Here you learn about the resources, methods, headers and message body as well as the response payloads in detail. A mocking service is available to explore the API.

Flow: Order Composed API Product

This flow - the three dark blue phases - describes how to order a Composed API product. A Composed API product is a webshop product configuration which is stored as an API product in the reseller’s webshop account. A typical preconfigured product could be a digital printed aluminium panel with a fixed size and a finishing such as mounting holes in each corner.

resources/Reseller%20API%20Flow%20-%20Order%20Static%20product-f21fcdc9-bf92-4b7e-a5a8-da7e47e2d48a.png

Preparation: Compose API Product

To be able to order a preconfigured webshop product an API product needs to be composed. First step is to contact Probo and become a reseller. A webshop account will be created for you, which will be configured for API usage.

Login to the Probo webshop. Make sure to enable the API mode. Start composing a product as if a product is ordered through the webshop. While composing a product, the API codes to be used over the API will be shown in the webshop frontend. When you reach the ‘save to cart’ stage, you will be able to save the product composition as an API product and define your own customer_code for it. You will be able to copy the payload of the composed product, including the product code and selected options. The customer_code is used to reference the composed product over the API.

Compose a product on the Probo webshop:

resources/Schermafbeelding%202019-12-17%20om%2010.41.10-206e5733-68fb-4e3b-ab73-00a6aa09fbf0.png

API-codes are shown while composing a product:

resources/Schermafbeelding%202019-12-17%20om%2010.42.21-348f1630-f640-4e63-925b-da03309b12f5.png

Instead of placing the composed product in the shopping cart, save it as an API product

resources/API%20development%20cycle-%20design-c5d8ceb2-af6a-4922-9c30-122004462b59.png

In the API menu, an overview of your API products with the assigned customer_code is shown:

resources/Schermafbeelding%202019-12-17%20om%2010.44.35-a2f117c4-fe04-4697-81e5-115c86a30cda.png

Phase: Select API Product

Use the /apiproducts resource to receive all Composed API products.

This resource returns a customer_code list.

Use /apiproducts/product/{customer_code} to receive details about a specific Composed API product. This resource returns information about:

  • the product code and selected options such as coating, milling and drillholes which composed the API product,
  • amount and dimensions (which can be overridden),
  • price (purchase- and sales price) per product depending on desired production time
  • total price (purchase- and sales price) depending on desired production time

resources/Static-Product-Select-API-Product-400-9f431a38-0815-4576-a8c1-1dec4f7d5139.png

Phase: Calculate Product Prices

Use the /price resource to receive the calculated price of one or more Composed API products, each for a specific amount and dimension. Include an id for each product to be able to reference the returned prices with the correct products. The id’s provided should be unique, or not provided at all. When no id’s are provided, the API will assign id’s by the order in which the products where provided.

The payload should include either code and selected_options as returned by the /apiproducts/product resource, or customer_code with optional overrides for the amount, height and width options. The calculation takes into account the provided delivery address, delivery date and desired shipping method.

resources/phase-calculate-product-prices-400-11f0efa0-b86e-4338-a3d5-685d3fc1d924.png

Phase: Order API Product(s)

Use the /order resource to place an order. Post information such as:

  • your own order id and reference,
  • contact email,
  • delivery address
  • product(s) with dimensions, amount and uri(s) to the print files. The payload should include either code and selected_options as returned by the /apiproducts/product resource, or customer_code with optional overrides on the amount, height and width options.
  • callback_url to receive order status
  • Motiflow pattern for the order. More information on Motiflow Pattern.

More information on File Uploading.

For testing purposes set the order\_type key to value "test". Test orders will be cancelled automatically. Test orders will not be produced, but will remain vissibile as cancelled orders in the orders overview of the reseller's webshop account. The deault value of the order\_type _key is "production".

resources/Phase---Order-API-Product-400-new-48ad34c8-29bc-42bb-8c67-62f11a64f5a4.png

It is possible to save the order as a draft. See the page Drafts for details.

See below for details on fetching the status of an order and cancelling an order.

Flow: Configure and Order a standard Webshop Product

This flow describes how to configure and order a webshop product.

resources/Reseller%20API%20Flow%20-%20Order%20Configurable%20Products-5e7e9850-1328-40c8-b158-a889a3233234.png

Phase: Select Product

Use the /products resource to receive all available products.

Phase: Configure Product

Use the /products/configure resource to calculate the next available options for the product and present those to your enduser as if you where configuring a product using the Probo webshop. Product options are available depending on the selected option(s) for the product in the previous step.

Caution! Do not use this endpoint in the following way:

1) periodically import and store product options using /product/{code}

2) call products/configure with stored product options to calculate a price

Between step 1) and step 2) the products may have changed in the Probo backend. Calling /product/configure in an asynchrone way with unknown options which where stored previously will cause failure and no price will be returned.

The products/configure endpoint is intended to be used to walk through the product options synchrone with the live version of the product.

It is possible to configure multiple products.

The post payload should include the products and (selected) options for the product. It also may include a delivery for the product.

This resource returns (per product):

  • available_options (a list of available options depending on selected options in post payload)
  • code (product code)
  • can_order (null means the product or options cannot be ordered/selected, true or missing means the product/option can be ordered/selected)
  • selected_options (the options as selected in the post payload)
  • prices (when no more options are available)
  • calculation_id (when all available options have been selected)

resources/phase-configure_product-400-82e187cd-48a2-4481-8c09-4dff3c4f783d.png

See the "Configure endpoint example" page for details.

Phase: Calculate Product Prices

Use the /price resource to receive the calculates price of one or more products, each for a specific amount and dimension. The calculation takes into account the provided delivery address, delivery date and desired shipping method.

Phase: Order Product(s)

Use the /order resource to order the configured product(s)

resources/Phase---Order-Products-400-new-bb2d26f4-055f-4d7b-a358-c57554c0fbf6.png

It is possible to save the order as a draft. See the page Drafts for details.

See below for details on fetching the status of an order and cancelling an order.

Order status

Use the /order/status endpoint to receive information about the status of the order.

From status accepted an url will be provided which can be used to share with Reseller's customer for tracking the order status.

Possible status:

  • accepted
  • in\_production
  • logistics
  • shipment\_created
  • shipment\_scanned\_by\_carrier
  • shipment\_in\_transit
  • shipment\_delayed
  • shipment\_returned
  • shipment\_exception
  • shipment\_not\_at\_home
  • shipment\_available\_at\_pickup\_point
  • shipment\_picked\_up
  • shipment\_delivered
  • cancelled

Cancel an order

use the /order/cancel endpoint to cancel an order. An order can be only be cancelled during the accepted state.


Reviews